RewriteEngine on
RewriteBase /{site_dir}
#canonicalization do not remove!
RewriteCond %{HTTP_HOST} !^{site_host}$
RewriteRule ^(.*)$ {site_url} [R=permanent,L]
#end canonicalization
RewriteRule ^index\.html$ {site_url} [R=permanent,L]
#301 redirect

#end 301
RewriteCond %{SCRIPT_FILENAME} !-f
RewriteCond %{SCRIPT_FILENAME} !-d
RewriteRule ^(.*)$ index.php [L]